package com.shensi.adminCollect.domain.station;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.shensi.adminCollect.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 实体卡
 * */

public class PhysicalCard implements Serializable {

    /**实体卡主键 */
    @ApiModelProperty(hidden = true)
    private Long id;

    /**实体卡号 */
    @ApiModelProperty(value = "实体卡号")
    @Excel(name = "卡号")
    private String physicalCardNo;

    /**设备号，读卡设备的设备号 */
    @ApiModelProperty(value = "设备号，读卡设备的设备号")
    private String equipmentNo;

    /**实体卡UID */
    @ApiModelProperty(value = "实体卡UID")
    private String equipmentUid;

    /**实体卡A密钥，16进制,必须是12位 */
    @ApiModelProperty(value = "实体卡A密钥，16进制,,必须是12位")
    private String secretKeyA;

    /**实体卡B密钥，16进制，必须是12位 */
    @ApiModelProperty(value = "实体卡B密钥，16进制,,必须是12位")
    private String secretKeyB;

    /**实体卡名称 */
    @ApiModelProperty(value = "卡名称")
    private String physicalCardName;

    /**油企id */
    @ApiModelProperty(value = "油企id")
    private Long enterpriseId;

    /**油企名称 */
    @ApiModelProperty(value = "油企名称")
    private String enterpriseName;

    /**油站id */
    @ApiModelProperty(value = "油站id")
    private String stationId;

    /**油站名称 */
    @ApiModelProperty(value = "油站名称")
    private String stationName;

    /**实体卡密码 */
    @ApiModelProperty(value = "实体卡密码")
    private String cardPassword;

    /**密码加盐 */
    @ApiModelProperty(value = "密码加盐")
    private String passwordSalt;

    /**持卡人姓名 */
    @ApiModelProperty(value = "持卡人姓名")
    private String userName;

    /**持卡人手机号 */
    @ApiModelProperty(value = "持卡人手机号")
    private String userPhone;

    /**持卡人公司 */
    @ApiModelProperty(value = "企业名称")
    private String userCompany;

    /**实体卡面额 */
    @ApiModelProperty(value = "实体卡面额")
    private BigDecimal physicalCardAmount;

    /**状态（0正常 1冻结 2注销） */
    @ApiModelProperty(value = "状态（0正常 1冻结 2注销）")
    private String cardStatus;

    /**创建者 */
    @ApiModelProperty(value = "创建者")
    private String createBy;

    /**创建时间 */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**更新者 */
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    /**更新时间 */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    /**
     * 判断此卡是否是陌生卡
     * */
    @ApiModelProperty(value = "0；陌生卡，1非陌生卡")
    private Integer isStrange;

    /**
     * 判断是新增还是校验卡数据是否可以新增
     * */
    @ApiModelProperty(value = "0；新增，1：校验")
    private Integer isAdd;

    @ApiModelProperty(value = "批次号id")
    private String batchId;

    @ApiModelProperty(value = "是否成功写卡，0 表示未写入，1 表示成功，2 表示失败")
    private String isSuccess;

    @ApiModelProperty(value = "卡类型;0:通用卡;1:汽油卡;2:柴油卡；3：LNG，4：CNG")
    private String cardType;

    @ApiModelProperty(value = "会员userId")
    private Integer appUserId;

    @ApiModelProperty(value = "实体卡类型，czk : 储值卡，dek：定额卡")
    private String physicalCardType;

    public PhysicalCard() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPhysicalCardNo() {
        return physicalCardNo;
    }

    public void setPhysicalCardNo(String physicalCardNo) {
        this.physicalCardNo = physicalCardNo;
    }

    public String getEquipmentNo() {
        return equipmentNo;
    }

    public void setEquipmentNo(String equipmentNo) {
        this.equipmentNo = equipmentNo;
    }

    public String getEquipmentUid() {
        return equipmentUid;
    }

    public void setEquipmentUid(String equipmentUid) {
        this.equipmentUid = equipmentUid;
    }

    public String getSecretKeyA() {
        return secretKeyA;
    }

    public void setSecretKeyA(String secretKeyA) {
        this.secretKeyA = secretKeyA;
    }

    public String getSecretKeyB() {
        return secretKeyB;
    }

    public void setSecretKeyB(String secretKeyB) {
        this.secretKeyB = secretKeyB;
    }

    public String getPhysicalCardName() {
        return physicalCardName;
    }

    public void setPhysicalCardName(String physicalCardName) {
        this.physicalCardName = physicalCardName;
    }

    public Long getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(Long enterpriseId) {
        this.enterpriseId = enterpriseId;
    }

    public String getEnterpriseName() {
        return enterpriseName;
    }

    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    public String getStationId() {
        return stationId;
    }

    public void setStationId(String stationId) {
        this.stationId = stationId;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getCardPassword() {
        return cardPassword;
    }

    public void setCardPassword(String cardPassword) {
        this.cardPassword = cardPassword;
    }

    public String getPasswordSalt() {
        return passwordSalt;
    }

    public void setPasswordSalt(String passwordSalt) {
        this.passwordSalt = passwordSalt;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserCompany() {
        return userCompany;
    }

    public void setUserCompany(String userCompany) {
        this.userCompany = userCompany;
    }

    public BigDecimal getPhysicalCardAmount() {
        return physicalCardAmount;
    }

    public void setPhysicalCardAmount(BigDecimal physicalCardAmount) {
        this.physicalCardAmount = physicalCardAmount;
    }

    public String getCardStatus() {
        return cardStatus;
    }

    public void setCardStatus(String cardStatus) {
        this.cardStatus = cardStatus;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getIsStrange() {
        return isStrange;
    }

    public void setIsStrange(Integer isStrange) {
        this.isStrange = isStrange;
    }

    public Integer getIsAdd() {
        return isAdd;
    }

    public void setIsAdd(Integer isAdd) {
        this.isAdd = isAdd;
    }

    public String getBatchId() {
        return batchId;
    }

    public void setBatchId(String batchId) {
        this.batchId = batchId;
    }

    public String getIsSuccess() {
        return isSuccess;
    }

    public void setIsSuccess(String isSuccess) {
        this.isSuccess = isSuccess;
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public Integer getAppUserId() {
        return appUserId;
    }

    public void setAppUserId(Integer appUserId) {
        this.appUserId = appUserId;
    }

    public String getPhysicalCardType() {
        return physicalCardType;
    }

    public void setPhysicalCardType(String physicalCardType) {
        this.physicalCardType = physicalCardType;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PhysicalCard other = (PhysicalCard) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPhysicalCardNo() == null ? other.getPhysicalCardNo() == null : this.getPhysicalCardNo().equals(other.getPhysicalCardNo()))
            && (this.getEquipmentNo() == null ? other.getEquipmentNo() == null : this.getEquipmentNo().equals(other.getEquipmentNo()))
            && (this.getEquipmentUid() == null ? other.getEquipmentUid() == null : this.getEquipmentUid().equals(other.getEquipmentUid()))
            && (this.getSecretKeyA() == null ? other.getSecretKeyA() == null : this.getSecretKeyA().equals(other.getSecretKeyA()))
            && (this.getSecretKeyB() == null ? other.getSecretKeyB() == null : this.getSecretKeyB().equals(other.getSecretKeyB()))
            && (this.getPhysicalCardName() == null ? other.getPhysicalCardName() == null : this.getPhysicalCardName().equals(other.getPhysicalCardName()))
            && (this.getEnterpriseId() == null ? other.getEnterpriseId() == null : this.getEnterpriseId().equals(other.getEnterpriseId()))
            && (this.getEnterpriseName() == null ? other.getEnterpriseName() == null : this.getEnterpriseName().equals(other.getEnterpriseName()))
            && (this.getStationId() == null ? other.getStationId() == null : this.getStationId().equals(other.getStationId()))
            && (this.getStationName() == null ? other.getStationName() == null : this.getStationName().equals(other.getStationName()))
            && (this.getCardPassword() == null ? other.getCardPassword() == null : this.getCardPassword().equals(other.getCardPassword()))
            && (this.getPasswordSalt() == null ? other.getPasswordSalt() == null : this.getPasswordSalt().equals(other.getPasswordSalt()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone()))
            && (this.getUserCompany() == null ? other.getUserCompany() == null : this.getUserCompany().equals(other.getUserCompany()))
            && (this.getPhysicalCardAmount() == null ? other.getPhysicalCardAmount() == null : this.getPhysicalCardAmount().equals(other.getPhysicalCardAmount()))
            && (this.getCardStatus() == null ? other.getCardStatus() == null : this.getCardStatus().equals(other.getCardStatus()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPhysicalCardNo() == null) ? 0 : getPhysicalCardNo().hashCode());
        result = prime * result + ((getEquipmentNo() == null) ? 0 : getEquipmentNo().hashCode());
        result = prime * result + ((getEquipmentUid() == null) ? 0 : getEquipmentUid().hashCode());
        result = prime * result + ((getSecretKeyA() == null) ? 0 : getSecretKeyA().hashCode());
        result = prime * result + ((getSecretKeyB() == null) ? 0 : getSecretKeyB().hashCode());
        result = prime * result + ((getPhysicalCardName() == null) ? 0 : getPhysicalCardName().hashCode());
        result = prime * result + ((getEnterpriseId() == null) ? 0 : getEnterpriseId().hashCode());
        result = prime * result + ((getEnterpriseName() == null) ? 0 : getEnterpriseName().hashCode());
        result = prime * result + ((getStationId() == null) ? 0 : getStationId().hashCode());
        result = prime * result + ((getStationName() == null) ? 0 : getStationName().hashCode());
        result = prime * result + ((getCardPassword() == null) ? 0 : getCardPassword().hashCode());
        result = prime * result + ((getPasswordSalt() == null) ? 0 : getPasswordSalt().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode());
        result = prime * result + ((getUserCompany() == null) ? 0 : getUserCompany().hashCode());
        result = prime * result + ((getPhysicalCardAmount() == null) ? 0 : getPhysicalCardAmount().hashCode());
        result = prime * result + ((getCardStatus() == null) ? 0 : getCardStatus().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", physicalCardNo=").append(physicalCardNo);
        sb.append(", equipmentNo=").append(equipmentNo);
        sb.append(", equipmentUid=").append(equipmentUid);
        sb.append(", secretKeyA=").append(secretKeyA);
        sb.append(", secretKeyB=").append(secretKeyB);
        sb.append(", physicalCardName=").append(physicalCardName);
        sb.append(", enterpriseId=").append(enterpriseId);
        sb.append(", enterpriseName=").append(enterpriseName);
        sb.append(", stationId=").append(stationId);
        sb.append(", stationName=").append(stationName);
        sb.append(", cardPassword=").append(cardPassword);
        sb.append(", passwordSalt=").append(passwordSalt);
        sb.append(", userName=").append(userName);
        sb.append(", userPhone=").append(userPhone);
        sb.append(", userCompany=").append(userCompany);
        sb.append(", physicalCardAmount=").append(physicalCardAmount);
        sb.append(", cardStatus=").append(cardStatus);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}